TESTNAME = 
SRC 	= ../vc/${TESTNAME}/filelist.f
TB	= -f ../vc/${TESTNAME}/tb.f   
INC_DIR1 = +incdir+../inc 
INC_DIR2 = 
INC_DIR3 = 
INC_DIR4 = 
INC_DIR5 = 
INC_DIR6 = 
INC_DIR7 = 
DEFINE  = 
VOPTS 	= -sverilog -l sim.log -cm line+tgl+fsm+cond -full64 -timescale=1ns/1ps +v2k +cli+3 +lint=TFIPC-L
DEBUSSY	= ${DEBUSSY_HOME}/share/PLI/VCS/LINUX64/novas.tab
PLI		= ${DEBUSSY_HOME}/share/PLI/VCS/LINUX64/pli.a
SOPT	= -l simv.log -cm line+tgl+fsm+cond +ntb_solver_mode=1
seed	= 1

vcs simv.vdb:
	rm -rvf rslt
	mkdir rslt
	mkdir rslt/wr
	mkdir rslt/rd
	vcs -sverilog \
	-f ${SRC} \
	${TB} \
	${VOPTS} \
	${INC_DIR1}\
	${INC_DIR2}\
	${INC_DIR3}\
	${INC_DIR4} \
	${INC_DIR5} \
	${INC_DIR6} \
	${INC_DIR7} \
	${DEFINE} \
	-R \
	-P ${DEBUSSY} ${PLI} \
	+ntb_random_seed=${seed}


verdi:
	verdi \
	-sverilog \
	-f ${SRC} \
	${TB} \
	${INC_DIR1}\
	${INC_DIR2}\
	${INC_DIR3}\
	${INC_DIR4} \
	${INC_DIR5} \
	${INC_DIR6} \
	${INC_DIR7} \
	${DEFINE} \
	-2001 &

coverage:
	urg -full64 -dir simv.vdb  
	dve -covdir simv.vdb &

nlint :  
	nLint -gui -top axi_sdram \
	-sverilog \
	-f ${SRC} \
	${INC_DIR1}\
	${INC_DIR2}\
	${INC_DIR3}\
	${INC_DIR4} \
	${INC_DIR5} \
	${INC_DIR6} \
	${INC_DIR7} \
	${DEFINE} \
	-2001 &      


help:
	@echo [make verdi]
	@echo 	-- this command is used to use the verdi to open the simulation envionment.
	@echo
	@echo [make clean]
	@echo 	-- this command is used to clear the simulation enviromemt.
	@echo
	@echo [make check]
	@echo 	-- this command is used check the write read result.


clean:
	@rm -rf *~ *.log *.vcd vc_hdrs.h .vcsmx_rebuild DVEfiles .nfs* .restartSimSession* axi_bus_tb.* *.vf *.log *.key nLint* *.fsdb *vdb
	@rm -rf simv* csrc* core* *.vrh *shell.v .__solver* *.key .ucli* .nfs* *.tcl urgReport covrpt *.conf *.txt *.rs inno_ddrn_000.*

clean_all:
	@rm -rf *~ *.log *.vpd vc_hdrs.h .vcsmx_rebuild DVEfiles .nfs* .restartSimSession* axi_bus_tb.* *.vf *.log *.key nLint* *.fsdb *vdb
	@rm -rf simv* csrc* core* *.vrh *shell.v .__solver* *.key .ucli* .nfs* *.tcl urgReport covrpt *.conf *.txt *.rs inno_ddrn_000.* *.rc verdiLog rslt *vdb
